package com.jiai.cloud.base.exception;

public class BaseException extends Exception {
	private static final long serialVersionUID = -1106912179584850802L;
	/**
	 * 直觀的異常信息 顯示到前颱的
	 */
	private String message;
	/**
	 * 異常代碼
	 */
	private int code;
	/**
	 * 詳細的異常信息開髮者查看
	 */
	private String description;
	
	public BaseException(String message,int code,String description){
		super(message);
		this.message=message;
		this.code=code;
		this.description=description;
	}
	public BaseException(String message,int code,Exception ex){
		super(ex);
		this.message=message;
		this.code=code;
		this.description=ex.getMessage();
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
}
